<div class="container-fluid">
    <div class="row ikg-row">
        <div class="col-sm-12 ikg-col">
            <div class="panel panel-default ikg-panel">
                <div class="panel-body">
                    <div class="col-lg-4">
                        <div class="input-group">
                            <label class="input-group-addon ikg-font-12">附件名称:</label>
                            <input type="text" class="form-control" id="roleName">
                        </div>
                    </div>
                    <div class="col-lg-4">
                        <button type="button" id="btn_query" class="btn btn-success btn-sm"
                                data-bind="click:fnSearch">
                            <i class="fa fa-search fa-lg"></i><span class="hidden-xs hidden-sm"> 查询</span></button>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- 工具栏 -->
    <div class="row ikg-row">
        <div class="col-sm-12 ikg-col">
            <div id="toolbar" class="btn-group">
                <button type="button" class="btn btn-success btn-sm"
                        data-bind="click:fnAdd">
                    <i class="fa fa-plus fa-lg" aria-hidden="true"></i><span class="hidden-xs hidden-sm"> 新增</span>
                </button>
                <button type="button" class="btn btn-success btn-sm"
                        data-bind="click:fnRemove">
                    <i class="fa fa-trash fa-lg" aria-hidden="true"></i><span class="hidden-xs hidden-sm"> 删除</span>
                </button>
            </div>
        </div>
    </div>
    <!-- 列表区域 -->
    <div class="row ikg-row">
        <div class="col-sm-12 ikg-col">
            <table data-bind="tableView:tableViewModel"></table>
        </div>
    </div>
</div>

<div id="attachMentDialog" class="modal hide" tabindex="-1" role="dialog"
     data-bind="template:{name:'attachMentModalTemplate',data:attachMentViewModel},ikgModal:{ backdrop: 'static', keyboard: false, show: modalVisible },css:{display:modalVisible?'block':'none'}"></div>

<script type="text/html" id="attachMentModalTemplate">
    <div class="modal-dialog" style="width: 560px" role="document">
        <div class="modal-content">
            <!-- header -->
            <div class="modal-header ikg-modal-header" id="modalHeader">
                <button type="button" class="close ikg-close" data-bind="click: close">&times;</button>
                <span class="modal-title ikg-modal-title" data-bind="text:title"></span>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" id="detailForm" autocomplete="off">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">附件名称</label>
                        <div class="col-sm-8">
                            <input id="uploadFile" type="file" name="files" data-bind="fileinput:uploadFileModel"/>
                        </div>
                    </div>
                    <!-- 默认基本信息 -->
                    <div style="display: none">
                        <input type="text" name="fileId" data-bind="value:attachmentId">
                    </div>
                </form>
            </div>
            <div class="modal-footer" id="modalFooter">
                <button type="button" class="btn btn-success ikg-btn-12" data-bind="click:upload">
                    <i class="fa fa-save fa-lg"></i> 上传
                </button>
                <button type="button" class="btn btn-default ikg-btn-12" data-bind="click:close">
                    <i class="fa fa-close"></i> 关闭
                </button>
            </div>
        </div>
    </div>
</script>